/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package model;

import com.opensymphony.xwork2.validator.annotations.DoubleRangeFieldValidator;
import com.opensymphony.xwork2.validator.annotations.RequiredStringValidator;
import com.opensymphony.xwork2.validator.annotations.StringLengthFieldValidator;

/**
 *
 * @author Thai Ha Cong
 */
public class ProductSearch {
    private String productName;
    private double minPrice;
    private double maxPrice;
    private String brand;
    private String sort;
    
    private String warranty;
    private String color;
    private String screen;
    private String storage;
    private String camera;
    private String os;
            
    private Integer categoryid;

    public ProductSearch() {
    }

    public String getProductName() {
        return productName;
    }

    //@RequiredStringValidator(message = "Product Name is required.")
    @StringLengthFieldValidator(message = "Product Name should contains 0-30 characters.", minLength = "0", maxLength = "30")
    public void setProductName(String productName) {
        this.productName = productName;
    }

    public double getMinPrice() {
        return minPrice;
    }

    @DoubleRangeFieldValidator(message = "Invalid Lower Price", minInclusive = "0", maxInclusive = "10000")
    public void setMinPrice(double minPrice) {
        this.minPrice = minPrice;
    }

    public double getMaxPrice() {
        return maxPrice;
    }

    @DoubleRangeFieldValidator(message = "Invalid Upper Price", minInclusive = "0", maxInclusive = "10000")
    public void setMaxPrice(double maxPrice) {
        this.maxPrice = maxPrice;
    }

    public String getBrand() {
        return brand;
    }

    public void setBrand(String brand) {
        this.brand = brand;
    }

    public String getSort() {
        return sort;
    }

    public void setSort(String sort) {
        this.sort = sort;
    }

    public Integer getCategoryid() {
        return categoryid;
    }

    public void setCategoryid(Integer categoryid) {
        this.categoryid = categoryid;
    }

    public String getWarranty() {
        return warranty;
    }

    public void setWarranty(String warranty) {
        this.warranty = warranty;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public String getScreen() {
        return screen;
    }

    public void setScreen(String screen) {
        this.screen = screen;
    }

    public String getStorage() {
        return storage;
    }

    public void setStorage(String storage) {
        this.storage = storage;
    }

    public String getCamera() {
        return camera;
    }

    public void setCamera(String camera) {
        this.camera = camera;
    }

    public String getOs() {
        return os;
    }

    public void setOs(String os) {
        this.os = os;
    }
}